﻿@using Apps.Models.Sys;

@model Apps.Models.Sys.SysSampleModel
@{
    ViewBag.Title = "编辑";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";

}
<script type="text/javascript">
    $(function () {
        $("#btnSave").click(function () {

                $.ajax({
                    url: "/SysSample/Edit",
                    type: "Post",
                    data: $("#EditForm").serialize(),
                    dataType: "json",
                    success: function (data) {
                        if (data.tag == 1) {
                            window.parent.frameReturnByMes(data.message);
                            window.parent.frameReturnByReload(true);
                            window.parent.frameReturnByClose()
                        }
                        else {
                            window.parent.frameReturnByMes(data.message+data.value);
                        }
                    }
                });
        });
    });
</script>


<div class="mvctool bgb">
    <a id="btnSave" style="float: left;" class="l-btn l-btn-plain"><span class="l-btn-left"><span class="l-btn-text icon-save" style="padding-left: 20px;">保存</span></span></a>
</div>
@using (Html.BeginForm("Edit", "SysSample", null, FormMethod.Post, new { Id = "EditForm" }))
{
    <table class="fromEditTable setTextWidth300">
        <tbody>
            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.Id)：
                </td>
                <td style="width:310px">
                    @Html.EditorFor(model => model.Id)
                </td>
            </tr>
            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.Name)：
                </td>
                <td>
                    @Html.EditorFor(model => model.Name)
                </td>

            </tr>
            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.Age)：
                </td>

                <td>
                    @Html.EditorFor(model => model.Age)
                </td>

            </tr>
            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.Bir)：
                </td>

                <td>
                    @Html.TextBoxFor(model => model.Bir)
                </td>

            </tr>

            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.Note)：
                </td>

                <td>
                    @Html.EditorFor(model => model.Note)
                </td>

            </tr>
            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.CreateTime)：

                </td>

                <td>
                    @Html.TextBoxFor(model => model.CreateTime)

                </td>

            </tr>
            <tr>
                <td style="width:100px; text-align:right;">
                    @Html.LabelFor(model => model.Photo)：
                </td>
                <td>
                    @Html.TextBoxFor(model => model.Photo)

                </td>


            </tr>
        </tbody>
    </table>
}
